﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Net;

public partial class XemSanPhamNCC : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            //System.Web.Services.Protocols.SoapHttpClientProtocol proxy = Session["MyServiceNCC"] as System.Web.Services.Protocols.SoapHttpClientProtocol;
            //if (proxy == null)
            //{
            //    proxy = (System.Web.Services.Protocols.SoapHttpClientProtocol)WSProxy.CreateWebService(WebServices_Param.WsNCCURL, WebServices_Param.WsNCCName);
            //    proxy.CookieContainer = new CookieContainer();
            //    Session["MyServiceNCC"] = proxy;
            //}

            System.Web.Services.Protocols.SoapHttpClientProtocol proxy = (System.Web.Services.Protocols.SoapHttpClientProtocol)WSProxy.CreateWebService(WebServices_Param.WsNCCURL, WebServices_Param.WsNCCName);
            object kq = WSProxy.CallWebService(proxy, "layHetSanPham", new object[] { });
            List<SanPhamNCC> sanPhams = WebServiceInvoker.ConvertType<List<SanPhamNCC>>(kq);


            DetailsView1.DataSource = sanPhams;
            DetailsView1.DataBind();
        }
        catch { } 
    }
}